package com.company.cloud.common.ribbon.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

import com.alibaba.cloud.nacos.ribbon.NacosServer;
import com.company.cloud.common.ribbon.rule.VersionIsolationRule;
import com.netflix.loadbalancer.IRule;

public class RuleConfigure {

	@Bean
	@ConditionalOnClass(NacosServer.class)
	@ConditionalOnMissingBean
	public IRule versionIsolationRule() {
		return new VersionIsolationRule();
	}
	
}
